﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace WcfServiceDuplex
{
	[ServiceContract(CallbackContract = typeof(IMyCallback),
		SessionMode = SessionMode.Required)]
	public interface IMyService
	{
		[OperationContract(IsOneWay=true)]
		void SendMessage(string str);

		[OperationContract(IsOneWay = true)]
		void SendUserMessage(string userId, string Message);

		[OperationContract(IsOneWay = true)]
		void Join(string userId);

		[OperationContract(IsOneWay = true)]
		void Leave(string userId);
	}

	public interface IMyCallback
	{
		[OperationContract(IsOneWay=true)]
		void SendMessageCallback(string str);

		[OperationContract(IsOneWay = true)]
		void ReceiveMessage(string message);
	}

}
